#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool containsDuplicate(vector<int>& nums) {
        sort(nums.begin(), nums.end());
        int len = nums.size();
        int newLen = unique(nums.begin(), nums.end()) - nums.begin();

        return len != newLen;
    }
};